﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace _01_Tower3._0
{
    internal class SceneMenu : IScene
    {
        public string Name => "SceneMenu";

        MenuSystem menu;

        public SceneMenu()
        {
            List<MenuSystem.MenuData> menuData = new();

            menuData.Add(new(SceneManger.sceneName=="SceneMap1" ? "重新开始" : "开始游戏", () => { SceneManger.instance.Init(); SceneManger.instance.ChangeSceneByName("SceneMap1"); }));
            menuData.Add(new("继续游戏", () => SceneManger.instance.ChangeSceneByName("SceneMap1")));
            menuData.Add(new("设置", () => Utility.MyPrint("3", 2, 12)));
            menuData.Add(new("退出", () => Environment.Exit(0)));

            menu = new MenuSystem(menuData,47,15);
        }

        public void Init()
        {

        }

        public void Input()
        {
            menu.Input();
        }


        public void Update()
        {

        }

        public void FixUpdate()
        {

        }

        public void Render()
        {
            menu.Render();
        }
        public void End()
        {

        }
    }
}
